package com.lingx.interfaces.impl;

import java.util.Map;

import org.springframework.stereotype.Component;

import com.lingx.interfaces.ILoginVerifyService;
import com.lingx.web.api.IApi;
import com.lingx.web.core.urihanlder.KaptchaHandler;
@Component
public class WeixinLoginVerifyServiceImpl implements ILoginVerifyService {

	@Override
	public String getCode() {
		return "weixin_qrcode";
	}

	@Override
	public boolean verify(String yzm, String account, Map<String, Object> params) {
		String ip=IApi.getParamString(params, "X-Real-IP", "");
		return ip.equals(KaptchaHandler.YZM_CACHE.getIfPresent(yzm));
	}

	@Override
	public boolean sendVerifyCode(String account, Map<String, Object> params) {
		return false;
	}

}
